


export function getEventBody (woParam,mParam,umParam,scheduleParam,woRegParam) {
	let eventBody ={};
	let service = []
	let state={
		reductionData:{},
		materialData:{},
		id:'',
	};
	let param={}
	let back ={
		data:{},
		flag:false,
		type:'array'
	}
	//添加通知单
	let addWorkOrder= {
		action:"add",
		model:"template",
		// param:{
		// },
		param:woParam,
		saveTo:"[state.reductionData]",
		refModel:{
			type:"templateDictionary",
			className:"ReductionWorkOrder"
		}
	}
	//新增领料单
	let addMaterial={
		action:"add",
		model:"template",
		// param:{
		// },
		param:mParam,
		saveTo:"[state.materialData]",
		refModel:{
			type:"templateDictionary",
			className:"ReductionMaterial"
		}
	}

	//update领料单
	let updateMaterial={
		action:"update",
		model:"template",
		// param:{
		// },
		param:umParam,
		saveTo:"",
		refModel:{
			id:"",
			type:"templateDictionary",
			className:"ReductionMaterial"
		}
	}

	//排程注册通知单
	let addRegisterForSchedule={
		action:"runAddRegister",
		model:"template",
		// param:{
		// 	id:'',
		// 	name:'',
		// 	refModel:'',
		// 	pointer:{id:'[state.reductionData.id]',className:'',type:''},
		// 	values:{},
		// },
		param: scheduleParam,
		saveTo:"",
		refModel:{
			id:"",
			type:"templateDictionary",
			className:"PlanSchedule"
		}
	}

	//排程注册领料单
	let addRegisterForWorkOrder={
		action:"runAddRegister",
		model:"template",
		// param:{
		// 	id:'',
		// 	name:'',
		// 	registerModel:'',
		// 	pointer:{id:'[state.materialData.id]',className:'',type:''},
		// 	values:{},
		// },
		param:woRegParam,
		saveTo:"",
		refModel:{
			id:"[state.reductionData.id]",
			type:"templateDictionary",
			className:"ReductionWorkOrder"
		}
	}

	service.push(addWorkOrder)
	service.push(addMaterial)
	service.push(updateMaterial)
	service.push(addRegisterForSchedule)
	service.push(addRegisterForWorkOrder)
	eventBody['state']=state;
	eventBody['param']=param;
	eventBody['service']=service;
	eventBody['back']=back;
   return eventBody;
}
